﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace Tetris
{
    public class ShapeCollection
    {
        public Shape shI = new Shape();
        public Shape shL = new Shape();
        public Shape shJ = new Shape();
        public List<Shape> MyShapes = new List<Shape>();
        int koorX = 0;
        int koorY = 0;

        public void AddShapeToCollection()
        {
            shI.ShapeI();
            shL.ShapeL();
            shJ.ShapeJ();
            MyShapes.Add(shI); 
            MyShapes.Add(shL); 
            MyShapes.Add(shJ);
        }

        /*public void PrintField()
        {
            Random rnd = new Random();
            int x = rnd.Next(0, 2);
            int q = 1;

                Console.SetCursorPosition(MyShapes[q].b4.x, MyShapes[q].b4.y);
                Console.Write("■");
                Console.SetCursorPosition(MyShapes[q].b4.x, MyShapes[q].b4.y - 1);
                Console.Write(" ");
                Console.SetCursorPosition(MyShapes[q].b3.x, MyShapes[q].b3.y);
                Console.Write("■");
                Console.SetCursorPosition(MyShapes[q].b3.x, MyShapes[q].b3.y - 1);
                Console.Write(" ");
                Console.SetCursorPosition(MyShapes[q].b2.x, MyShapes[q].b2.y);
                Console.Write("■");
                Console.SetCursorPosition(MyShapes[q].b2.x, MyShapes[q].b2.y - 1);
                Console.Write(" ");
                Console.SetCursorPosition(MyShapes[q].b1.x, MyShapes[q].b1.y);
                Console.Write("■");
                Console.SetCursorPosition(MyShapes[q].b1.x, MyShapes[q].b1.y - 1);
                Console.Write(" ");


        }*/

        /*public void ShapeDoStep()
        {
            int step = 0;
            do
            {
               
                MyShapes[1].b1.x = MyShapes[1].b1.x + koorX;
                MyShapes[1].b2.x = MyShapes[1].b2.x + koorX;
                MyShapes[1].b3.x = MyShapes[1].b3.x + koorX;
                MyShapes[1].b4.x = MyShapes[1].b4.x + koorX;
                MyShapes[1].b1.y = MyShapes[1].b1.y + koorY;
                MyShapes[1].b2.y = MyShapes[1].b2.y + koorY;
                MyShapes[1].b3.y = MyShapes[1].b3.y + koorY;
                MyShapes[1].b4.y = MyShapes[1].b4.y + koorY;
                PrintField();
                step++;
                Thread.Sleep(1000);
            }
            while (step != 15);

        }*/
        
        



    }

}
